import request from '@/config/axios'

export interface MatchmakerRecordVO {
  id: number
  matchmakerId: number
  matchmakerName: string
  memberId: number
  memberName: string
  stringingNum: number
  serveTimeBegin: string
  serveTimeEnd: string
}

// 查询相亲红娘记录列表
export const getMatchmakerRecordPage = async (params) => {
  return await request.get({ url: `/maker/matchmaker-record/page`, params })
}

// 查询相亲红娘记录详情
export const getMatchmakerRecord = async (id: number) => {
  return await request.get({ url: `/maker/matchmaker-record/get?id=` + id })
}

// 新增相亲红娘记录
export const createMatchmakerRecord = async (data: MatchmakerRecordVO) => {
  return await request.post({ url: `/maker/matchmaker-record/create`, data })
}

// 修改相亲红娘记录
export const updateMatchmakerRecord = async (data: MatchmakerRecordVO) => {
  return await request.put({ url: `/maker/matchmaker-record/update`, data })
}

// 删除相亲红娘记录
export const deleteMatchmakerRecord = async (id: number) => {
  return await request.delete({ url: `/maker/matchmaker-record/delete?id=` + id })
}

// 导出相亲红娘记录 Excel
export const exportMatchmakerRecord = async (params) => {
  return await request.download({ url: `/maker/matchmaker-record/export-excel`, params })
}
